xen/flask: change bool_maxstr to PAGE_SIZE
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Tue, 26 May 2015 18:13:28 +0000 (14:13 -0400)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 3 Jun 2015 10:12:01 +0000 (11:12 +0100)
commit50daa79c58af69cc0ce8a92f46f829003f11727d
treed10291f3d22035eb5aebfb1d86d58b01e10ce055
parent4f835b64cf7425d7f1527ef2b4a9d8c171115137
xen/flask: change bool_maxstr to PAGE_SIZE

When FLASK_{GET,SET}BOOL is called with a named boolean, the call to
flask_security_resolve_bool is made prior to bool_maxstr being populated
by flask_security_make_bools.  This results in the maximum string length
being specified as zero, which is not useful.  While it would be
possible to initialize bool_maxstr correctly prior to its use, it is
simpler to use a fixed maximum of PAGE_SIZE as is done for the other
calls to safe_copy_string_from_guest.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/xsm/flask/flask_op.c